SwappableImage.opIndex

Get a pixel given the position.

  1. Color opIndex(size_t x, size_t y)
    struct SwappableImage(Color)
    @nogc @safe
    Color
    opIndex
    (
    size_t x
    ,
    size_t y
    )
    if (
    isColor!Color
    )
  2. Color opIndex(size_t offset)

Parameters

x size_t

X position in image

y size_t

Y position in image

Return Value

Type: Color

The pixel color at point.

Throws

If x or y coordinate is outside of the image boundries.

See Also

getPixel

Meta